package com.alliky.core.data.dao

import androidx.paging.PagingSource
import androidx.room.Dao
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import com.rrc.common.entity.CategoryVO

/**
 * ================================================
 * @Description: 描述
 * @Author: wxianing
 * @Date: 2023/2/9 10:34
 * ================================================
 */
@Dao
interface CategoryDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun insert(data: List<CategoryVO>)

    @Query("SELECT * FROM CategoryVO")
    fun queryAll(): PagingSource<Int, CategoryVO>

    @Query("Delete FROM CategoryVO")
    fun clear()
}